package org.adorsys.aderp.jpa.api.change;

import org.adorsys.aderp.jpa.api.audit.AbstractAuditRecord;


public class ChangeRecord implements Comparable<ChangeRecord>{
	
	private final AbstractAuditRecord auditRecord;
	
	private final Object entity;

	public ChangeRecord(AbstractAuditRecord auditRecord, Object entity) {
		super();
		this.auditRecord = auditRecord;
		this.entity = entity;
	}

	public AbstractAuditRecord getAuditRecord() {
		return auditRecord;
	}

	public Object getEntity() {
		return entity;
	}

	@Override
	public int compareTo(ChangeRecord o) {
		return auditRecord.compareTo(o.getAuditRecord());
	}
}
